<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/dataTables.bootstrap.css}" rel="stylesheet">
    <link th:href="@{/css/bootstrapValidator.min.css}" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style>
        .login-box{
        margin: 20% auto auto;
        max-width: 320px ;
        padding: 50px 50px 36px;
        background-color: #eee;
        border-radius: 5px;
        box-shadow: 0 0 10px;
    }
    </style>
</head>
<body>


<main class="container-fluid">

        <div class="login-box">
            <!--<h2 style="margin-bottom: 20px">登录</h2>-->
            <form action="/admin/login" class="form-horizontal" role="form" method="post">
                <div class="form-group"><label class="sr-only" for="username">帐号</label>
                    <div class="input-group">
                        <div class="input-group-addon"><i class="glyphicon glyphicon-user"></i></div>
                        <input type="password" class="form-control" id="username" name="username" placeholder="请输入帐号">
                    </div>
                </div>
                <div class="form-group"><label class="sr-only" for="password">密码</label>
                    <div class="input-group">
                        <div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
                        <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-block">立即登陆</button>
                </div>
                <div style="color: red" th:if="${param.error}">
                    用户名或密码错误
                </div>
            </form>
        </div>

</main>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script th:src="@{/js/jquery-3.3.1.min.js}"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script th:src="@{/js/layer.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/bootstrapValidator.js}"></script>
<script th:src="@{/js/language/zh_CN.js}"></script>
<script th:src="@{/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/js/dataTables.bootstrap.min.js}"></script>
<script th:src="@{/js/jquery.spring-friendly.min.js}"></script>

<script>
    var allow = function (action) {
        var tips;
        if(action===1){
            tips="确认通过审核？"
        }else {
            tips="确认驳回举报？"
        }
        layer.confirm(tips, {
            btn: ['确认', '取消'] //按钮
        }, function () {
            $.ajax({
                type: 'post',
                data:{
                    action:action
                },
                url: '/admin/api/report/',
                success: function (result) {
                    layer.alert(result.msg, function (index) {
                        layer.close(index)
                        parent.location.reload()
                    })
                }
            });
        })
    };

</script>
<script>
</script>
</body>
</html>
